package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 * @author hua
 * @since 2022-12-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_manage_bill")
public class ManageBillDo extends Model<ManageBillDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("bill_no")
    private String billNo;

    /**
     * 账单类型(beginBill 头程账单 |endBill 尾程账单+成本 | beginBillCost 头程成本)
     */
    @TableField("type")
    private String type;

    /**
     * 尾程账单金额，头程需要自己去sql拿
     */
    @TableField("price")
    private Double price;

    /**
     * 成本
     */
    @TableField("cost")
    private Double cost;

    /**
     * 账单付款状态 paid unpaid
     */
    @TableField("payment_status")
    private String paymentStatus;

    /**
     * 成本 付款状态
     */
    @TableField("cost_payment_status")
    private String costPaymentStatus;

    /**
     * 账单有效期
     */
    @TableField("begin_time")
    private Date beginTime;

    /**
     * 账单有效期
     */
    @TableField("end_time")
    private Date endTime;

    /**
     * 成本有效期
     */
    @TableField("cost_begin_time")
    private Date costBeginTime;

    /**
     * 成本有效期
     */
    @TableField("cost_end_time")
    private Date costEndTime;

    /**
     * 付款期限
     */
    @TableField("pay_begin_time")
    private Date payBeginTime;

    /**
     * 付款期限
     */
    @TableField("pay_end_time")
    private Date payEndTime;

    @TableField("company_id")
    private Long companyId;

    /**
     * 搜索类型 柜号/BL/入库单号
     */
    @TableField("search_type")
    private String searchType;

    /**
     * 头程表主键
     */
    @TableField("header_id")
    private Long headerId;

    @TableField("search_content")
    private String searchContent;

    /**
     * BL号
     */
    @TableField("bill_lading_number")
    private String billLadingNumber;

    /**
     * 0 未录入成本  1已经录入成本成本
     */
    @TableField("is_cost")
    private Integer isCost;

    @TableField("create_time")
    private Date createTime;

    @TableField("create_by")
    private Long createBy;

    @TableField("update_time")
    private Date updateTime;

    @TableField("update_by")
    private Long updateBy;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    /**
     * 0 普通 1: 柜子 和账单 多对一
     */
    @TableField("batch")
    private Integer batch;

    @TableField("file_id")
    private Long fileId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
